﻿<%@ Page Language="C#" MasterPageFile="~/Wap/Shop/ShopSite.Master"  AutoEventWireup="true" CodeBehind="WeixinKefu.aspx.cs" Inherits="ZLCMS.Web.Wap.Shop.WeixinKefu" %>

<%@ Import Namespace="ZLCMS.Business.Util" %>
<%@ Import Namespace="ZLCMS.Business.WeixinService" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<title>微信客服</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="pages" runat="server">
<%=ZLCMS.Business.WeixinService.JSSDKUtil.GetConfigScript(false)%>
  <script type="text/javascript">
      wx.ready(function () {
          $(document).executeCommand({
              successCallBack: function (result) {
                  wx.closeWindow();
              },
              errorCallback: function (errorCode, msg) {

                  if (errorCode == "43004") {
                      alert('请先关注公众号！');
                        location.href = '<%=ModuleKit.HtmlModuleData("FOLLOWLINK", "") %>';
                  } else {
                      alert(msg);
                  }
              }
          }, 'Pub.SendTemplate', {
              OpenId: '<%=CurrentMember.WxOpenId %>',
              Owner: 'admin',
              Url: '<%=ZLCMS.Business.Util.ServerUtil.GetRootURI() %>/wap/shop/Default.aspx',
              TemplateId: '-rPJCkTdEVT64kyL-42qaUWj-tyKvC2v5T8_AKFs6BE',
              TemplateParameters: [{ Name: 'first', Value: '请切换到输入模式，直接回复您的问题' }, { Name: 'keyword1', Value: '无' }, { Name: 'keyword2', Value: '无'}]
          });
      });
  </script>
</asp:Content>
